import cn.edu.zut.bussiness.Avegrade;
import cn.edu.zut.model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.Test;

@ContextConfiguration("classpath*:database-context.xml")
public class test extends AbstractTestNGSpringContextTests {
    @Autowired
    Student student,student1;
    @Autowired
    Avegrade avegrade;
    @Test
    public void test(){

        student.setSno("123");
        student.setName("ad");
        student.setSex("nan");
        student.setGrade(50);
        student1.setSno("456");
        student1.setName("ad1");
        student1.setSex("nan1");
        student1.setGrade(80);
    }
    @Test
    public void test1(){

        avegrade.insertBook(student);
        avegrade.insertBook(student1);
    }
}
